package com.itmei.supergeneric.config;

import com.itmei.supergeneric.cache.MapperCache;
import com.itmei.supergeneric.cache.UserCache;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author itmei
 * @Date 2023/3/10 17:25
 * @description: 用于手动创建bean
 * @Title: BeanConfig
 * @Package com.itmei.supergeneric.config
 */
@Configuration
public class BeanConfig {

    /**
     * 创建 UserCache 的 Bean
     * @return
     */
    @Bean
    public UserCache userCache(){
        return new UserCache();
    }

    /**
     * 创建 MapperCache 的 Bean
     * @return
     */
    @Bean
    public MapperCache mapperCache(){
        return new MapperCache();
    }
}
